public class TestCourseSelection {
    public static void main(String[] args) {
        // 创建教师
        Teacher teacher1 = new Teacher("T001", "张三", "男", null);
        Teacher teacher2 = new Teacher("T002", "李四", "女", null);

        // 创建课程
        Course course1 = new Course("C001", "Java程序设计", "A栋301", "周一上午9-11点", teacher1);
        Course course2 = new Course("C002", "数据库原理", "B栋202", "周三下午2-4点", teacher2);

        // 关联教师和课程
        teacher1 = new Teacher("T001", "张三", "男", course1);
        teacher2 = new Teacher("T002", "李四", "女", course2);

        // 创建学生
        Student student1 = new Student("S001", "王五", "男");
        Student student2 = new Student("S002", "赵六", "女");

        // 模拟业务操作
        System.out.println("===教师开课===");
        System.out.println(teacher1.getName() + " 开设 " + course1.getName() + " 课程");
        System.out.println(teacher2.getName() + " 开设 " + course2.getName() + " 课程");

        System.out.println("\n===学生选课===");
        student1.selectCourse(course1);
        student2.selectCourse(course2);

        System.out.println("\n===打印课表===");
        student1.printSchedule();
        student2.printSchedule();

        System.out.println("\n===学生退课===");
        student1.dropCourse();
        student1.printSchedule();
    }
}